package com.hbzhit.modules.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hbzhit.common.utils.MybatisCache;
import com.hbzhit.modules.sys.entity.SysRoleOrgEntity;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色与组织对应关系
 *
 * @author Mark sunlightcs@gmail.com
 */
@Mapper
@Repository
@CacheNamespace(implementation = MybatisCache.class, eviction = MybatisCache.class)
public interface SysRoleOrgDao extends BaseMapper<SysRoleOrgEntity> {

	/**
	 * 根据角色ID，获取组织ID列表
	 * @param roleId 角色id
	 * @return 组织id集合
	 */
	List<Long> queryOrgIdList(Long roleId);
}
